Entry

Constructors

Link copied to clipboard
constructor(parentElement: DynamicListWidget, texts: Translatable.Result, scope: DynamicListWidget.Scope, visibility: DynamicListWidget.Visibility = Visibility.VISIBLE)

Types

Link copied to clipboard
interface EntryPos : Pos
Link copied to clipboard
Link copied to clipboard
interface SelectableElement : Selectable, Element

Properties

Link copied to clipboard
open override var lastSelected: Element?

getter and setter for the cached element.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val skip: Boolean

Whether the search should exclude this content from search results. This is active state, so can change between true and false as needed.

Link copied to clipboard
open override val texts: Translatable.Result

The searchable texts. Both desc and prefix of the result are searched as "description"

Functions

Link copied to clipboard
open override fun appendNarrations(builder: NarrationMessageBuilder)

Append narration messages to current NarrationMessageBuilder. The list will handle list position and navigation, the entry should focus on providing title and description information, and internal navigation information as applicable (if there are multiple children in one entry for example)

Link copied to clipboard
open fun appendTitleNarrations(builder: NarrationMessageBuilder)
Link copied to clipboard
fun atY(mouseY: Int): Boolean
Link copied to clipboard
open fun charTyped(chr: Char, modifiers: Int): Boolean
Link copied to clipboard
abstract fun children(): MutableList<out Element>
Link copied to clipboard
open override fun getFocused(): Element?
Link copied to clipboard
open override fun getFocusedPath(): GuiNavigationPath?
Link copied to clipboard
open override fun getNavigationFocus(): ScreenRect
Link copied to clipboard
Link copied to clipboard
open override fun getNavigationPath(navigation: GuiNavigation): GuiNavigationPath?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun handleContext(contextType: ContextType, position: Position): Boolean

Handle a context event. This will be triggered by a parent, typically on key press or mouse click. A parent object can of course also be a context handler, handle context as applicable and then pass the event downstream for further handling.

Link copied to clipboard
open fun hoveredElement(mouseX: Double, mouseY: Double): Optional<Element>
Link copied to clipboard
open fun init()
Link copied to clipboard
open override fun isDragging(): Boolean
Link copied to clipboard
open override fun isFocused(): Boolean
Link copied to clipboard
open override fun isMouseOver(mouseX: Double, mouseY: Double): Boolean
Link copied to clipboard
open fun keyPressed(keyCode: Int, scanCode: Int, modifiers: Int): Boolean
Link copied to clipboard
open fun keyReleased(keyCode: Int, scanCode: Int, modifiers: Int): Boolean
Link copied to clipboard
open override fun mouseClicked(mouseX: Double, mouseY: Double, button: Int): Boolean
Link copied to clipboard
open fun mouseDragged(mouseX: Double, mouseY: Double, button: Int, deltaX: Double, deltaY: Double): Boolean
Link copied to clipboard
open fun mouseMoved(mouseX: Double, mouseY: Double)
Link copied to clipboard
open fun mouseReleased(mouseX: Double, mouseY: Double, button: Int): Boolean
Link copied to clipboard
open fun mouseScrolled(mouseX: Double, mouseY: Double, horizontalAmount: Double, verticalAmount: Double): Boolean
Link copied to clipboard
fun onAdd(parentPos: Pos, previous: DynamicListWidget.Entry?)
Link copied to clipboard
open fun onResize()
Link copied to clipboard
open fun onScroll(dY: Int)
Link copied to clipboard
open override fun popLast()

Indicates that the overlay has been removed and the parent should return focus to the cached element, if any, in lastSelected

Link copied to clipboard
open override fun provideContext(builder: ContextResultBuilder)

Add a set of grouped context action builders to a result

Link copied to clipboard
open override fun pushLast()

Indicates to the parent element to cache it's current focused element. The current focused element should be stored in lastSelected

Link copied to clipboard
open override fun render(context: DrawContext, mouseX: Int, mouseY: Int, delta: Float)

Renders this entry. Works exactly as one would expect for any other render call.

Link copied to clipboard
open fun renderBorder(context: DrawContext, x: Int, y: Int, width: Int, height: Int, mouseX: Int, mouseY: Int, hovered: Boolean, focused: Boolean, delta: Float)
Link copied to clipboard
abstract fun renderEntry(context: DrawContext, x: Int, y: Int, width: Int, height: Int, mouseX: Int, mouseY: Int, hovered: Boolean, focused: Boolean, delta: Float)
Link copied to clipboard
fun renderExtras(context: DrawContext, mouseX: Int, mouseY: Int, delta: Float)
open fun renderExtras(context: DrawContext, x: Int, y: Int, width: Int, height: Int, mouseX: Int, mouseY: Int, hovered: Boolean, focused: Boolean, delta: Float)
Link copied to clipboard
open fun renderHighlight(context: DrawContext, x: Int, y: Int, width: Int, height: Int, mouseX: Int, mouseY: Int, hovered: Boolean, focused: Boolean, delta: Float)
Link copied to clipboard
open fun resetHover(mouseX: Double, mouseY: Double)

When called the parent element should reselect a hovered element based on the supplied mouse positions, if it tracks such things

Link copied to clipboard
fun scroll(dY: Int)
Link copied to clipboard
open override fun setDragging(dragging: Boolean)
Link copied to clipboard
open override fun setFocused(focused: Boolean)
open override fun setFocused(focused: Element?)
Link copied to clipboard
open override fun toString(): String